if ((Get-Job | where {$_.Name -eq 'nginx'}).length -gt 0) {
	Stop-Job -Name phpfpm
	Remove-Job -Name phpfpm
	Start-Job -Name phpfpm -ScriptBlock {D:\UHome\app\php\php-cgi.exe -b 127.0.0.1:9000 -c D:\UHome\app\php\php.ini}

	D:\UHome\app\nginx\nginx.exe -p D:\UHome\app\nginx\ -s stop
	Stop-Job -Name nginx
	Remove-Job -Name nginx
	Start-Job -Name nginx -ScriptBlock {D:\UHome\app\nginx\nginx.exe -p D:\UHome\app\nginx\}
} else {
	Start-Job -Name phpfpm -ScriptBlock {D:\UHome\app\php\php-cgi.exe -b 127.0.0.1:9000 -c D:\UHome\app\php\php.ini}
	Start-Job -Name nginx -ScriptBlock {D:\UHome\app\nginx\nginx.exe -p D:\UHome\app\nginx\}
}